<h1>Listing users</h1>

<% if notice %>
<p id="notice" class="alert alert-success"><%= notice %></p>
<% end %>

<table class="table table-striped">
  <tr>
    <th>Name</th>
    <th></th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%= user.name %></td>
    <td>
    	<div class="btn-group">
    		<%= link_to 'Show', user, :class => 'btn' %>
    		<%= link_to 'Edit', edit_user_path(user), :class => 'btn' %>
    		<%= link_to 'Destroy', user, confirm: 'Are you sure?', method: :delete, :class => 'btn' %>
    	</div>
    </td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New User', new_user_path %>
